﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kooboo.HtmlFunc;
using Kooboo.HtmlFunc.Providers;

namespace Kooboo.CMS.SiteConverter.Parser.WebForm
{
    public class LabelParser : ParserBase, IParser<ILabel>
    {
        #region IParser<ILabel> Members

        public void Parse(ILabel obj)
        {
            var markup = string.Format("<%:@\"{0}\".Label({1})%>", Razor.LabelParser.GetInnerText(obj), Razor.LabelParser.GetLabelKey(obj));
            var markupNode = NodeExtension.CreateNode(markup);
            Razor.LabelParser.ReplateInner(obj, markupNode);
        }

        #endregion
    }
}
